// 定义数组
$spacing-value: (0, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160);
$display-value: (block, none, flex, grid);
$position-value: (absolute, fixed, relative);
$radius-value: (0, 8, 16, 20, 30, 40, 50, 60, 100);
$align-value: (left, center, right);
$weight-value: (bold, normal);

// 生成margin
@each $space in $spacing-value {
	.m-#{$space} {
		margin: #{$space}rpx !important;
	}
	.mt-#{$space} {
		margin-top: #{$space}rpx !important;
	}
	.ml-#{$space} {
		margin-left: #{$space}rpx !important;
	}
	.mr-#{$space} {
		margin-right: #{$space}rpx !important;
	}
	.mb-#{$space} {
		margin-bottom: #{$space}rpx !important;
	}
}

// 生成padding类
@each $space in $spacing-value {
	.p-#{$space} {
		padding: #{$space}rpx
	}
	.pt-#{$space} {
		padding-top: #{$space}rpx !important;
	}
	.pl-#{$space} {
		padding-left: #{$space}rpx !important;
	}
	.pr-#{$space} {
		padding-right: #{$space}rpx !important;
	}
	.pb-#{$space} {
		padding-bottom: #{$space}rpx !important;
	}
}

// 生成display类
@each $space in $display-value {
	.d-#{$space} {
		display: #{$space}
	}
}

// 生成weight类
@each $space in $weight-value {
	.#{$space} {
		font: {
			weight: #{$space}
		}
	}
}

// 生成position类
@each $space in $position-value {
	.#{$space} {
		position: #{$space};
	}
}

// 生成border-radius
@each $space in $radius-value {
	.radius-#{$space} {
		border-radius: #{$space}rpx;
	}
}

// 生成text-align
@each $space in $align-value {
	.t-#{$space} {
		text-align: #{$space};
	}
}